Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error dialog is deltachat-rpc-server is not found #4479

Merged
merged 3 commits into from
Jan 27, 2025
Merged

error dialog is deltachat-rpc-server is not found #4479

merged 3 commits into from
Jan 27, 2025

Conversation

Simon-Laux
Copy link
Member

@Simon-Laux Simon-Laux commented Jan 11, 2025

closes #4469

Bildschirmfoto 2025-01-11 um 04 59 16

needs to also be tested on windows (after installation rename deltachat-rpc-server or delete it to simulate the issue)

Copy link
Contributor

@nicodh nicodh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Windows 10

This is what I get. Which is not really what your screen shot shows

edit: this is the message created by ipc.ts obviously

image

@Simon-Laux
Copy link
Member Author

The error is only shown in packaged releases

@r10s
Copy link
Member

r10s commented Jan 15, 2025

are there reasons at scale thinkable where this could happen to a normal user that are not related to an AntiVirus program?

otherwise, maybe be a bit more broad and on point, also avoiding too technical things in the headline - the normal end-user has no idea an "core library" even exist

Your AntiVirus Probably Destroyed this App 😈

Copy link
Collaborator

@WofWca WofWca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from one comment, looks good.

Comment on lines +62 to +61
// I think we can exit in all the cases, because all errors here are serious
app.exit(1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where can I see the list of errors? I'm worried that there might be non-critical errors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the list is a comment at the start of the function:

this.serverProcess.on('error', err => {
      // The 'error' event is emitted whenever:
      // - The process could not be spawned.
      // - The process could not be killed.
      // - Sending a message to the child process failed.
      // - The child process was aborted via the signal option.
      // ~ https://nodejs.org/api/child_process.html#event-error

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, missed that.

Sending a message to the child process failed.

I'm not sure about this. Are we unable to proceed when this happens? Have we seen this happen?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better exit/crash than undefined behaviour

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's for sure. But what I'm getting at is that maybe this happens all the time right now, and Delta Chat keeps working fine, without us knowing it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will act weird if messages get lost -> like won't react to user action. Better to fail in those cases that we notice the problem and can fix it IMO.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave this line out until after 1.52.0.
But if you're sure it's fine, I won't insist.

@link2xt
Copy link
Collaborator

link2xt commented Jan 22, 2025

Would be great to merge this even without the wording improvement. This is blocking Rust upgrade and iroh upgrade in the core.

@nicodh
Copy link
Contributor

nicodh commented Jan 22, 2025

I thought maybe @Simon-Laux Simon will react on the suggestions. Why is this blocking stuff in the core?

@link2xt
Copy link
Collaborator

link2xt commented Jan 22, 2025

Why is this blocking stuff in the core?

See my comment here: deltachat/deltachat-core-rust#6338 (comment)
I want to update Rust, but then the next core release will have false positives. False positive by Microsoft was fixed, so it should not be a problem for most users, but some users may run third-party antivirus that will delete the core.

@nicodh nicodh changed the title add special error dialog for the case that deltachat-rpc-server is not found error dialog is deltachat-rpc-server is not found Jan 22, 2025
@nicodh
Copy link
Contributor

nicodh commented Jan 22, 2025

I want to update Rust, but then the next core release will have false positives

@link2xt You mean "may have" false positives? We don't expect that to happen, right?

@WofWca
Copy link
Collaborator

WofWca commented Jan 22, 2025

You mean "may have" false positives? We don't expect that to happen, right?

I'm pretty sure we do. The false-positives pretty much have to do with Rust upgrade, see that issue.

@Simon-Laux
Copy link
Member Author

I thought maybe @Simon-Laux Simon will react on the suggestions

no don't have opinions on the wording, I did my part: it works for me in packaged builds. I don't care about the exact message/wording.
The main point for me is that we get information we need when people complain and send us screenshots of the error window without sending us the log.
The other point is that people know it was their antivirus, so I agree with bjoern in principle (making message shorter and more direct). But I won't participate in the wording debate further

@link2xt
Copy link
Collaborator

link2xt commented Jan 22, 2025

We don't expect that to happen, right?

It will happen, I built the binaries with new Rust several times and each time there were false positives. But it will be easier to report them once we have binaries with false positives in the releases.

@@ -29,6 +29,7 @@
- add show_app_in_chat option to webxdc info message context menu #4459
- add experimental content protection option (to prevent screenshots and screenrecording the app) #4475
- app picker for webxdc apps in attachement menu #4485
- add special error dialog for the case that deltachat-rpc-server is not found #4479
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be rebased before merging, so that the changelog entry is not in the past/already-released version.

@nicodh nicodh merged commit c0fdab6 into main Jan 27, 2025
9 of 12 checks passed
@nicodh nicodh deleted the simon/i4469 branch January 27, 2025 12:34
WofWca added a commit that referenced this pull request Jan 27, 2025
#4479 did not go into 1.52.0.
nicodh pushed a commit that referenced this pull request Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add dedicated error dialog when core executable is missing
5 participants